﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:vm="clr-namespace:Palluk.PassMaster.ViewModel"
        mc:Ignorable="d" 
        x:Class="Palluk.PassMaster.MainWindow"
        Title="MainWindow" d:DesignWidth="600" SizeToContent="WidthAndHeight">
    <DockPanel d:DataContext="{d:DesignInstance vm:MainWindowViewModel, IsDesignTimeCreatable=True}">
        <Grid Margin="0" Style="{DynamicResource ActionBarStyle}" DockPanel.Dock="Top" Height="30">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                <Button Content="Generate" HorizontalAlignment="Left" Margin="10,0,0,0" Width="75" Style="{DynamicResource ActionBarButton}" Command="{Binding GenerateCommand, Mode=OneWay}"/>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="1" Margin="20" DockPanel.Dock="Bottom">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <DockPanel Margin="0,0,10,0" Width="300" HorizontalAlignment="Right" Grid.Column="1">
                <Label Content="Password agreements:" VerticalAlignment="Top" Style="{DynamicResource SectionTitleLabel}" DockPanel.Dock="Top"/>
                <Grid VerticalAlignment="Top" Margin="0,10,0,0" DockPanel.Dock="Bottom">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="125"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="35"/>
                        <RowDefinition Height="35"/>
                        <RowDefinition Height="35"/>
                        <RowDefinition Height="35"/>
                    </Grid.RowDefinitions>
                    <Label Content="Password lenght:" VerticalAlignment="Top" Grid.ColumnSpan="2" HorizontalAlignment="Left"/>
                    <TextBox HorizontalAlignment="Left" Height="23" Margin="0,4,0,0" TextWrapping="Wrap" Text="{Binding Minimum, ValidatesOnExceptions=True}" VerticalAlignment="Top" Width="35" Grid.Column="1"/>
                    <Label Content="to" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="40,0,0,0" Grid.Column="1"/>
                    <TextBox HorizontalAlignment="Left" Height="23" Margin="66.097,4,0,0" TextWrapping="Wrap" Text="{Binding Maximum, ValidatesOnExceptions=True}" VerticalAlignment="Top" Width="35" Grid.Column="1"/>
                    <Label Content="Number of digits:" HorizontalAlignment="Left" Margin="0,7.52,0,1.52" VerticalAlignment="Center" Grid.Row="1"/>
                    <Slider VerticalAlignment="Center" SmallChange="5" Grid.Row="1" TickPlacement="BottomRight" Grid.Column="1" Margin="0,6.5,25,6.5" Maximum="{Binding Maximum, Mode=OneWay}" Value="{Binding CurrentNumericsChars}"/>
                    <Label Content="Number of upcases:" HorizontalAlignment="Left" Margin="0,7.52,0,1.52" VerticalAlignment="Center" Grid.Row="2"/>
                    <Slider VerticalAlignment="Center" SmallChange="5" Grid.Row="2" TickPlacement="BottomRight" Grid.Column="1" Margin="0,6.5,25,6.5" Maximum="{Binding Maximum, Mode=OneWay}" Value="{Binding CurrentUpcasesChars}"/>
                    <Label Content="Number of symbols:" HorizontalAlignment="Left" Margin="0,7.52,0,1.52" VerticalAlignment="Center" Grid.Row="3"/>
                    <Slider VerticalAlignment="Center" SmallChange="5" Grid.Row="3" TickPlacement="BottomRight" Grid.Column="1" Margin="0,6.5,25,6.5" Maximum="{Binding Maximum, Mode=OneWay}" Value="{Binding CurrentSymbolsChars}"/>
                    <Label Content="{Binding CurrentNumericsChars}" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="1" Width="25" FlowDirection="RightToLeft"/>
                    <Label Content="{Binding CurrentUpcasesChars}" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="2" Width="25" FlowDirection="RightToLeft"/>
                    <Label Content="{Binding CurrentSymbolsChars}" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="3" Width="25" FlowDirection="RightToLeft"/>
                </Grid>
            </DockPanel>
            <DockPanel Grid.Column="2" HorizontalAlignment="Right" Width="200">
                <Label Content="Result passwords:" VerticalAlignment="Top" Style="{DynamicResource SectionTitleLabel}" DockPanel.Dock="Top"/>
                <ListBox ItemsSource="{Binding AvailPassword}" Style="{DynamicResource PasswordListBoxStyle}" Margin="0,10,0,0" ItemContainerStyle="{DynamicResource PasswordListBoxItemStyle}"/>
            </DockPanel>
        </Grid>
    </DockPanel>
</Window>
